using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace Woz
{
    public class OptionsPanel : UserControl
    {
        public OptionsPanel()
        {
            this.Width = Woz.StaticVariables.Instance.ToolOptionPanelsWidth;
        }

        /// <summary>
        /// override the resize to constrain the width of this options panel
        /// </summary>
        /// <param name="pEventArgs">empty</param>
        protected override void OnResize(EventArgs pEventArgs)
        {
            // make sure the width does not increase to a value more than the maximum
            if (this.Width > Woz.StaticVariables.Instance.ToolOptionPanelsWidth)
            {
                this.Width = Woz.StaticVariables.Instance.ToolOptionPanelsWidth;
            }

            base.OnResize(pEventArgs);
        }
    }
}
